<?php defined('_JEXEC') or die('Restricted access'); ?>
 
<h1><?php echo "Joomla! Studio"; ?></h1>
       
<form name="input" action="index.php?option=com_media&amp;task=studio.image&amp;folder=<?php echo $this->state->folder; ?>&amp;im[]=<?php echo $this->state->path;?>&amp;img=<?php echo $this->state->image;?>"  method="POST">
        
        <div id="wrapper">
	<div id="content">

	<div class="tab"><h3 class="tabtxt" title="Dimmensions"><a href="#">Dimmensions</a></h3></div>
	<div class="tab"><h3 class="tabtxt" title="Rotate/Flip"><a href="#">Rotate/Flip</a></h3></div>
	<div class="tab"><h3 class="tabtxt" title="Effects"><a href="#">Effects</a></h3></div>
	<div class="tab"><h3 class="tabtxt" title="Colorize"><a href="#">Colorize</a></h3></div>
	<div class="tab"><h3 class="tabtxt" title="Others"><a href="#">Others</a></h3></div>
	
	<div class="boxholder">
		<div class="box">
				<h3><?php echo "Dimmensions"; ?></h3>
		<fieldset id ="dimmensions">
         <h3>Width</h3>
		<input id="width" name="width" type="text" size="4" />
		 x
        <input id="height" name="height" type="text" size="4" />
        <h3>        Height</h3> 
         </fieldset>
		
		<h3><?php echo "Resize"; ?></h3>   
		<fieldset id ="resize">      
           <select id="resize" name="resize" onchange="resize_color(this.selectedIndex)" >
          		<option value="0"><?php echo "Select"; ?></option>
          		 <option value="default">Default</option>
         		 <option value="bestfit">Best Fit</option>
         		 <option value="crop">Crop</option>
        		 <option value="stretch">Stretch</option>
        		 <option value="fill">Fill</option>
        	</select>
        	<br /><br /> Fill Color &nbsp; &nbsp; <input id="resizecolor" name="resizecolor" type="text" size="12" disabled="true"  />
        </fieldset>	
		</div>
		    
  <div class="box">
        <h3><?php echo "Rotate"; ?></h3>
          <fieldset id="degrees">
          	<input id="rotate" name="rotate" type="text" size="4" />&nbsp; degrees
          </fieldset>
        <h3><?php echo "Flip"; ?></h3>
		<fieldset id="flipsel">
          <select id="flip" name="flip">
          <option value="0"><?php echo"Select"; ?></option>
          <option value="H"><?php echo "V"; ?></option>
          <option value="V"><?php echo"H"; ?></option>
        </select>
        </fieldset>
        </div>
        
		 <div class="box">
        <h3><?php echo "Effects"; ?></h3>
        <fieldset id="effects">
		 <fieldset><?php echo "Greyscale"; ?>
        <input type="checkbox" name="greyscale" id="greyscale"/>
        <?php echo "Edge Detect"; ?>
        <input type="checkbox" name="edgedetect" id="edgedetect"/>
		<?php echo "Mean Removal"; ?>
        <input type="checkbox" name="meanremoval" id="meanrm"/>
         <?php echo "Sepia"; ?>
        <input type="checkbox" name="sepia" id="sepia"/>
        </fieldset>
        <fieldset>
        <?php echo "Emboss"; ?>
        <input type="checkbox" name="emboss" id="emboss"/>
        <?php echo "Blur"; ?>
        <input type="checkbox" name="blur" id="blur"/>
		<?php echo "Invert"; ?>
        <input type="checkbox" name="negate" id="negate"/>  
        <?php echo "Drop Shadow"; ?>
        <input type="checkbox" name="drop" id="drop"/>  
		</fieldset>
		</fieldset>
		</div> 
<div class="box">	 
       	<h3><?php echo "Colorize"; ?></h3>
		<div id="area">
	<div id="knob"></div>
</div>
<p id="upd">XX</p>
		<div id="area2">
	<div id="knob2"></div>
	</div>

<p id="upd2">XX</p>
		<div id="area3">
	<div id="knob3"></div>
</div>
<p id="upd3">XX</p>
<span id="setColor"></span>
		</div>
<div class="box">
	   <strong>Brightness</strong>
	   		<div id="area4">
	<div id="knob4"></div>
</div>
<p id="upd4">XX</p>
<strong>Contrast</strong>
		<div id="area5">
	<div id="knob5"></div>
</div>
<p id="upd5">XX</p>
<strong>Smooth</strong>
<div id="area6">
	<div id="knob6"></div>
	</div>
	<p id="upd6">XX</p>
</div></div></div></div>

		<input type="hidden" size ="3" name="r"  id="r" value="0"/>
		<input type="hidden" size ="3" name="g"  id="g" value="0"/>
		<input type="hidden" size ="3" name="b"  id="b" value="0"/>
		<input type="hidden" size ="3" name="x"  id="x" value="0"/>
		<input type="hidden" size ="3" name="y"  id="y" value="0"/>
		<input type="hidden" size ="3" name="w"  id="w" value="0"/>
		<input type="hidden" size ="3" name="h"  id="h" value="0"/>
		<input type="hidden" size ="3" name="bright"  id="bright" value="0"/>
		<input type="hidden" size ="3" name="contrast"  id="contrast" value="0"/>
		<input type="hidden" size ="3" name="opacity"  id="opacity" value="0"/>

 
 
 <div id="wrapper1">
	
	<div class="tab1txt"> <h3 class="tab1" title="options"><a href="#">Options</a></h3> </div>
	<div class="tab1txt"><h3 class="tab1" title="Save"><a href="#">Save</a></h3></div>
	<div class="tab1txt"><h3 class="tab1" title="Naming options"><a href="#">Naming <br />Options</a></h3></div>
	<div class="tab1txt"><h3 class="tab1" title="Thumbnails"><a href="#">Thumbnails</a></h3></div>
	<div class="tab1txt"><h3 class="tab1" title="Watermarks"><a href="#">Watermarks</a></h3></div>
	<div class="boxholder">
	
		<div class="box1">

			<h3><?php echo "Image Library"; ?></h3>   
			<fieldset id ="imagelib">      
	           <select id="imagelib" name="imagelib">
	          		<option value="0"><?php echo "Select"; ?></option>
	          		 <option value="gd">Php GD</option>
	         		 <option value="im">Image Magick</option>
	         		 <option value="gm">Graphics Magick</option>
	        	</select>
	        </fieldset>	
        
			<button type="submit"><?php echo JText::_( 'Apply' ); ?></button> 
			</form>
			
			
			<form name="crop">
			<input type="button" id="btn" 
			 
			value="Crop">
			</form>
			<form name="undo" action="index.php?option=com_media&amp;task=studio.undo&amp;folder=<?php echo $this->state->folder; ?>&amp;im[]=<?php echo $this->state->path;?>"  method="post">
			<button type="submit"><?php echo JText::_( 'Undo' ); ?></button> 
			</form>

		</div>
	
		<div class="box1">
		<form name="save" action="index.php?option=com_media&amp;task=studio.save&amp;folder=<?php echo $this->state->folder; ?>&amp;im[]=<?php echo $this->state->path;?>"  method="post">
		
		<h3><?php echo "Image Library"; ?></h3>   
			<fieldset id ="imagelib">      
	           <select id="imagelib" name="imagelib">
	          		<option value="0"><?php echo "Select"; ?></option>
	          		 <option value="gd">Php GD</option>
	         		 <option value="im">Image Magick</option>
	         		 <option value="gm">Graphics Magick</option>
	        	</select>
	        </fieldset>	
	        
	        
		 <strong>Save As</strong><br />
		<input id="savename" name="savename" type="text" size="40" /><br /><br />
<strong>FOLDER: /images/</strong><input id="savefolder" name="savefolder" type="text" size="40" /><br />
<input type="hidden" size ="3" name="quality"  id="quality" value="80"/><br />
<strong>Quality(jpeg)</strong>
<div id="area7">
	<div id="knob7"></div>
	</div>
	<p id="upd7">XX</p>
		<button type="submit"><?php echo JText::_( 'Save' ); ?></button> </form>
		</div> 
		
		
		<div class="box1">
		<form name="tn_wm" action="index.php?option=com_media&amp;task=studio.generate&amp;folder=<?php echo $this->state->folder; ?>&amp;im[]=<?php echo $this->state->path;?>"  method="post">
	     
	    <h3><?php echo "Naming options for generated thumbnails and watermarks"; ?></h3>
	    <fieldset id ="naming">     
	     <strong>Custom Name </strong><br />
		<input id="savename" name="savename" type="text" size="40" /><br /><br />
		<strong>FOLDER: /images/</strong><input id="savefolder" name="savefolder" type="text" size="40" /><br />
				
		<br /><strong>or</strong><br /><br />
				
		<strong>Prefix</strong><br />
		<input id="prefix" name="prefix" type="text" size="40" /><br /><br />
		
		<strong>Directory (/images/)</strong><br />
		<input id="directory" name="directory" type="text" size="40" /><br /><br />
		
		<strong>Use Size</strong><br />
		<select id="usesize" name="usesize">
          	<option value="0"><?php echo "Select"; ?></option>
          	<option value="file">File only</option>
         	<option value="dir">Directory only</option>
         	<option value="both">Both</option>
	    </select>
	        	
		</fieldset>
		
		</div> 
		
		<div class="box1">
			<h3><?php echo "Image Library"; ?></h3>   
			<fieldset id ="imagelib">      
	           <select id="tn_imagelib" name="tn_imagelib">
	          		<option value="0"><?php echo "Select"; ?></option>
	          		 <option value="gd">Php GD</option>
	         		 <option value="im">Image Magick</option>
	         		 <option value="gm">Graphics Magick</option>
	        	</select>
	        </fieldset>
		
			<h3><?php echo "Thumbnail"; ?></h3>   
			
			<fieldset id ="thumbnail">
		         <h3>Width</h3>
				<input id="width" name="width" type="text" size="4" />
				 x
		        <input id="height" name="height" type="text" size="4" />
		        <h3>        Height</h3> 
         	</fieldset>
						
			<button type="submit" name="thumbnail"><?php echo JText::_( 'Generate Thumbnail' ); ?></button><br />
		</div>
		
		
		<div class="box1">
			<h3><?php echo "Image Library"; ?></h3>   
			<fieldset id ="imagelib">      
	           <select id="wm_imagelib" name="wm_imagelib">
	          		<option value="0"><?php echo "Select"; ?></option>
	          		 <option value="im">Php GD</option>
	         		 <option value="im">Image Magick</option>
	         		 <option value="gm">Graphics Magick</option>
	        	</select>
	        </fieldset>
		
			<h3><?php echo "Watermark"; ?></h3>   
			<fieldset id ="watermark">
			     
		<strong>Watermark File</strong><br />
		<input id="wmname" name="wmname" type="text" size="40" /><br /><br />
		<strong>FOLDER: /images/</strong><input id="wmfolder" name="wmfolder" type="text" size="40" /><br />
				
		<br /><strong>or</strong><br /><br />
				
		<strong>Text</strong><br />
		<input id="text" name="text" type="text" size="40" /><br />
		
		<br />
		<table border=0 cellpadding="0">
		<tr>
			<td><strong>Font</strong></td>
			<td>&nbsp;</td>
			<td><strong>Font Size</strong></td>
			<td>&nbsp;</td>
			<td><strong>Font Color</strong></td></tr>
		<tr>
			<td><input id="font" name="font" type="text" size="40" /></td>
			<td>&nbsp;</td>
			<td><input id="fontsize" name="fontsize" type="text" size="3" /></td>
			<td>&nbsp;</td>
			<td><input id="fontcolor" name="fontcolor" type="text" size="12" /></td>
		</tr>
		</table>
		
		
		
		
 		<br />
 		<br />
       	 <strong>Position</strong><br />
	     <select id="position" name="position">
          	 <option value="0"><?php echo"Select"; ?></option>
          	 <option value="center">Center</option>
	         <option value="top">Top</option>
			 <option value="topright">Top-Right</option>
	         <option value="topleft">Top-Left</option>
	         <option value="left">Left</option>
	         <option value="right">Right</option>
	         <option value="bottom">Bottom</option>
	         <option value="bottomright">Bottom-Right</option>
	         <option value="bottomleft">Bottom-Left</option>
	         <option value="random">Random</option>
		</select>
		<br /><br />
	
		
			
			
	        </fieldset>
	        
		<button type="submit" name="watermark"><?php echo JText::_( 'Generate Watermark' ); ?></button>
	        	
		</div>
		
		</form>

		
		</div> 
		</div>  
		 	
		 	
<div class="image"><img src="<?php echo $this->state->url;?>" id="image"  ></div>    
